﻿using DevExpress.ExpressApp.DC;
using DevExpress.Xpo;

namespace EasyXaf.EntityDesigner.BusinessObjects.Entities.ValidationRules;

/// <summary>
/// 范围规则
/// </summary>
[XafDisplayName("范围规则")]
[XafDefaultProperty(nameof(Name))]
public partial class RangeRule : ValidationRule
{
	private string _minValue;
	private string _maxValue;

	/// <summary>
	/// 最小值
	/// </summary>
	[XafDisplayName("最小值")]
	public string MinValue
	{
		get => _minValue;
		set => SetPropertyValue(nameof(MinValue), ref _minValue, value);
	}

	/// <summary>
	/// 最大值
	/// </summary>
	[XafDisplayName("最大值")]
	public string MaxValue
	{
		get => _maxValue;
		set => SetPropertyValue(nameof(MaxValue), ref _maxValue, value);
	}

	public RangeRule(Session session)
		: base(session)
	{
	}
}
